home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / shared_lib / init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-09  |  585 b   |  38 lines

  1. /*
  2.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  3.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  4.  *    DICE-LICENSE.TXT.
  5.  */
  6.  
  7. /*
  8.  *  INIT.C
  9.  */
  10.  
  11. #include "defs.h"
  12.  
  13. Prototype void InitC(void);
  14. Prototype void UnInitC(void);
  15.  
  16. Prototype SignalSemaphore SemLock;
  17. Prototype List          StrList;
  18.  
  19. SignalSemaphore SemLock;
  20. List        StrList;
  21.  
  22. void
  23. InitC(void)
  24. {
  25.     NewList(&StrList);
  26.     InitSemaphore(&SemLock);
  27. }
  28.  
  29. void
  30. UnInitC(void)
  31. {
  32.     Node *node;
  33.  
  34.     while (node = RemHead(&StrList))
  35.     FreeMem(node, sizeof(Node) + strlen(node->ln_Name) + 1);
  36. }
  37.  
  38.